package com.guigu.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.guigu.LbtService;
import com.guigu.mapper.LbtMapper;
import com.guigu.vo.Lbt;
import com.guigu.vo.LbtVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class LbtServiceImpl implements LbtService {
    @Autowired
    private LbtMapper lbtMapper;
    @Override
    public PageInfo<Lbt> selectAll(LbtVo vo, int pageNo, int pageSize) {
        PageHelper.startPage(pageNo,pageSize);
        List<Lbt> lbts = lbtMapper.selectAll(vo);
        PageInfo<Lbt> lbtPageInfo = new PageInfo<>(lbts);
        return lbtPageInfo;
    }

    @Override
    public List<Lbt> One1(int id) {
        List<Lbt> one = lbtMapper.One1(id);
        return one;
    }

    @Override
    public List<Lbt> One2(int id) {
        return lbtMapper.One2(id);
    }

    @Override
    public PageInfo<Lbt> selectAll1(LbtVo vo,int pageNo,int pageSize) {
        PageHelper.startPage(pageNo,pageSize);
        List<Lbt> lbts = lbtMapper.selectAll1(vo);
        PageInfo<Lbt> lbtPageInfo = new PageInfo<>(lbts);
        return lbtPageInfo;
    }
}